import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import {HttpModule} from '@angular/http';
import {FormsModule} from '@angular/forms';

import { AppComponent } from './app.component';
import { TopbannerComponent } from './component/topbanner/topbanner.component';
import { MiddlebannerComponent } from './component/middlebanner/middlebanner.component';
import { LogoComponent } from './component/logo/logo.component';
import { HomeComponent } from './component/home/home.component';
// 引入
import {RouterModule , Routes} from '@angular/router';
import { SarchComponent } from './component/sarch/sarch.component';
import { CartComponent } from './component/cart/cart.component';
import { MenuComponent } from './component/menu/menu.component';
import { HotsearchComponent } from './component/hotsearch/hotsearch.component';
import { MenuleftComponent } from './component/menuleft/menuleft.component';
import { MenurightComponent } from './component/menuright/menuright.component';
import { CarouselComponent } from './component/carousel/carousel.component';
import { SelectComponent } from './component/select/select.component';
import { SeckillComponent } from './component/seckill/seckill.component';
import { TreasureComponent } from './component/treasure/treasure.component';
import { FlooroneComponent } from './component/floorone/floorone.component';
import { FloortwoComponent } from './component/floortwo/floortwo.component';
import { QrcodeComponent } from './component/qrcode/qrcode.component';
import { FooterlastComponent } from './component/footerlast/footerlast.component';
import { FooterhelpComponent } from './component/footerhelp/footerhelp.component';
import { FooterinforComponent } from './component/footerinfor/footerinfor.component';
import { SideslipComponent } from './component/sideslip/sideslip.component';
import { FilterPipe } from './component/filter/filter.pipe';
import { GotocartComponent } from './component/gotocart/gotocart.component'
import { MyhttpService } from './services/myhttp.service';
import { YvgaoComponent } from './component/yvgao/yvgao.component'
// 路由配置
let appRouter:Routes=[
   {path:'home',component:HomeComponent},
   {path:'gotocart',component:GotocartComponent},
   {path:'yvgao',component:YvgaoComponent},
   {path:'',component:HomeComponent}
]

@NgModule({
  declarations: [
    AppComponent,
    TopbannerComponent,
    HomeComponent,
    MiddlebannerComponent,
    SarchComponent,
    LogoComponent,
    CartComponent,	
    MenuComponent, 
    HotsearchComponent, 
    MenuleftComponent, 
    MenurightComponent, 
    CarouselComponent, 
    SelectComponent, 
    SeckillComponent, 
    TreasureComponent, 
    FlooroneComponent, 
    FloortwoComponent,
    QrcodeComponent,
    FooterlastComponent,
    FooterhelpComponent,
    FooterinforComponent,
    SideslipComponent,
    FilterPipe,
    GotocartComponent,
    YvgaoComponent
  ],
  imports: [
    BrowserModule,
    HttpModule,
    RouterModule.forRoot(appRouter),
    FormsModule
  ],
  providers: [MyhttpService],
  bootstrap: [AppComponent]
})
export class AppModule { }
